<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="favicon.ico"> <link href="/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.min.css" rel="stylesheet">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <link href="/css/style.min.css?v=4.0.0" rel="stylesheet">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/bootstrap-treeview.css" rel="stylesheet">
    <base target="_blank">
	<!-- 搜索样式CSS-Start -->
	<link href="/common/css/searchStyle.css" rel="stylesheet">
	<!-- 搜索样式CSS-End -->
	<!-- 下拉 -->
	<link href="/css/plugins/chosen/chosen.css" rel="stylesheet">
</head>
<style type="text/css">
	.btn{
	    padding: 10px 60px;
	}
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-6">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
							<div class="form-group">
                                <label class="col-sm-3 control-label">当前配置的项目名称啊：</label>
                                <input type="hidden" id="projectId" name="projectId">
                                <input id="projectName" name="projectName" readonly="readonly" class="form-control" type="text" style="width:160px;display: inline-block;">
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">是否启用展示CPU图表：</label>
                                <select class="chosen-select" name="showCpu" tabindex="8" id="isShowCPU">
								</select>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">是否启用展示内存图表：</label>
                                <select class="chosen-select" name="showMem" tabindex="8" id="isShowMEM">
								</select>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">是否启用展示磁盘图表：</label>
                                <select class="chosen-select" name="showDisk" tabindex="8" id="isShowDisk">
								</select>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-7 col-sm-offset-8" style="text-align: center;">
                                    <button class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
	<script src="/js/jquery.min.js?v=2.1.4"></script>
	<script src="/js/bootstrap.min.js?v=3.3.5"></script>
	<script src="/js/content.min.js?v=1.0.0"></script>
	<script src="/js/plugins/validate/jquery.validate.min.js"></script>
	<script src="/js/plugins/validate/messages_zh.min.js"></script>
	<script src="/js/plugins/layer-pc/layer.js"></script>
	<script src="/common/form-validator.js"></script>
	<script src="/common/bootstrap-treeview.js"></script>
	<script src="/common/petecat.js"></script>
	<script src="/js/jquery.cookie.js"></script>
	 <!-- HTML之间的传值 -->
	<script src="/js/jquery.params.js"></script>
    <!-- 组件通用 -->
    <script src="/common/frame.js"></script>
    <!-- 下拉 -->
	<script src="/js/plugins/chosen/chosen.jquery.js"></script>
<script type="text/javascript">
    $(function(){
    	var status =JSON.parse('[{"key":"1","value":"启用"},{"key":"0","value":"禁用"}]');
    	var itemCPU = {
        		id:"isShowCPU",
        		data:status
        	};
        initSelectData(itemCPU);
        var itemMEM = {
            		id:"isShowMEM",
            		data:status
            	};
        initSelectData(itemMEM);
         var item = {
         		id:"isShowDisk",
         		data:status
         	};
        initSelectData(item);
        var e = "<i class='fa fa-times-circle'></i> ";
        $("#signupForm").validate({
            submitHandler:function(form){
                var data = serializeForm(form);
                var formData = JSON.stringify(data);
                var req = {};
                req['reqJSON'] = {
                    type : 'post',
                    url : BASE_URL+'/base/custom/saveCustomConfig',
                    data : formData
                };
                req['useToken'] = true;
                req['successFn'] = function(respData){
                    layer.msg(respData.message, {icon: 6},function(){
                        if(respData.code == SUCCESS_CODE){
                            var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                            parent.layer.close(index);
                        }
                    });
                };
                ajaxRequest(req);
            }
        })
    });
</script>
</body>
</html>